//载入主题
var css = window.localStorage.getItem("skin-css");
if(css != null){
$('#skincss').attr('href','/assets/hhc/'+css+'.css');
}
//alert(window.localStorage.getItem("skin-css"));

$(function(){
//更换主题色彩事件
$('body').on('click','[data-id="changeskin"]',function(){
$('#skincss').attr('href','/assets/hhc/'+$(this).attr('class')+'.css');
var css = window.localStorage.setItem("skin-css",$(this).attr('class'))
});

//回车键事件
$("[name='searchtxt']").keyup(function(event){
  if(event.keyCode ==13){
    search($(this).val());
  }
});

//搜索按钮
$(".search .uk-icon-search").on('click',function(){
    search($("[name='searchtxt']").val());
});

function search(txt){
	window.location.href=$(".search .uk-icon-search").attr('data-url') + '?keyword='+txt;
}

});

